/*
 * @Author: your name
 * @Date: 2021-10-22 15:22:47
 * @LastEditTime: 2022-03-01 18:53:53
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \zjzl-web-svn-3\src\api\system\area.js
 */

// 使用时：
// import { youFunction } from "@/api/system/area";

import request from '@/utils/request'

let {
  get: $get,
  delete: $delete,
  post: $post,
  post_query: $post_query,
  post_queryOctet: $post_queryOctet,
  download: $download,
  upload: $upload,
  uploadFile: $newUpload
} = request;


/** 查询地域分页信息 根据区划码id值查询地域信息 */
export const getAreaInfoList = (params) => {
  return $get("/system/tArea/list", params);
};

/** 查询地域信息 根据区划码id值查询地域信息 */
export const getAreaInfoById = (params) => {
  return $get("/system/tArea/listAll", params);
};

/** 根据id查阅地域名称 根据area_code查询area_name */
export const getAreaNameById = (params) => {
  return $get("/system/tArea/listAreaName", params);
};

/** 查询树状结构的地域分页信息 */
export const getAreaInfoTreeTypeList = (params) => {
  return $get("/system/tArea/organization", params);
};

/** 添加地域信息 */
export const addAreaInfo = (params) => {
  return $post("/system/tArea/add", params);
};

/** 更新地域信息 */
export const updateAreaInfo = (params) => {
  return $post("/system/tArea/update", params);
};


/** 删除地域信息 */
export const delAreaInfo = (params) => {
  return $delete("/system/tArea/delete", params);
};



/** 高德地址编码与逆编码 通过地址转换详细地址 通过字符串的地址转换成数值形式的经纬度 */
export const address2lenLat = (params) => {
  return $get("/system/geoCode/getAddress", params);
};
